/*
Jack Morris
11/20/14
Chapter 5
Page 50
Assinment 2
*/
#include <stdio.h>

int main() 
{ 
  int hour, min, day;
  printf("Enter a 24-hour time: ");
  scanf("%d:%d", &hour, &min);
  if (hour > 13) 
  {
    hour = hour - 12;
    day = 0;
  }
  if (day = 0)
  {
    printf("Equivalent 12-hour time: %d:%d AM", hour, min);
  }
  else
  {
    printf("Equivalent 12-hour time: %d:%d PM", hour, min);
  }
  return(0);
}